﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Zj.CourseManage.Domain.Core
{
    /// <summary>
    /// department  student in
    /// </summary>
    public class Department
    {
        public Department()
        {
            this.Name = string.Empty;
            this.Budget = 5000;
            this.Students = new HashSet<Student>();
        }



        [Key,DatabaseGenerated( DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }



        [StringLength(30,MinimumLength =3)]
        public string Name { get; set; }



        [DataType(DataType.Currency)]
        public decimal   Budget { get; set; }



        [Timestamp]
        public byte[] RowVersion { get; set; }



        public virtual ICollection<Student> Students { get; set; }
    }
}
